package com.syh.jn.scm.domain.supplier.event.finance;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.supplier.entity.finance.PurchaseInvoice;

public class PurchaseInvoiceEvent extends DomainEvent<PurchaseInvoice> {

  public static final String PURCHASE_INVOICE_DESTROY = "purchaseInvoiceDestroy";
  public static final String PURCHASE_INVOICE_CREATED = "purchaseInvoiceCreated";
  public static final String PURCHASE_INVOICE_UPDATE = "purchaseInvoiceUpdate";
  public static final String PURCHASE_INVOICE_CONFIRM = "purchaseInvoiceConfirm";
  public static final String PURCHASE_INVOICE_UNCONFIRM = "purchaseInvoiceUnconfirm";

  public static PurchaseInvoiceEvent buildCreated(Object[] values) {
    PurchaseInvoiceEvent stateEvent = new PurchaseInvoiceEvent();
    stateEvent.eventName = PURCHASE_INVOICE_CREATED;
    stateEvent.values = values;
    return stateEvent;
  }

  public static PurchaseInvoiceEvent buildDestroy(Object[] values) {
    PurchaseInvoiceEvent stateEvent = new PurchaseInvoiceEvent();
    stateEvent.eventName = PURCHASE_INVOICE_DESTROY;
    stateEvent.values = values;
    return stateEvent;
  }

  public static PurchaseInvoiceEvent buildUpdate(Object[] values) {
    PurchaseInvoiceEvent stateEvent = new PurchaseInvoiceEvent();
    stateEvent.eventName = PURCHASE_INVOICE_UPDATE;
    stateEvent.values = values;
    return stateEvent;
  }

  public static DomainEvent purchaseInvoiceConfirm(Object[] values) {
   PurchaseInvoiceEvent stateEvent = new PurchaseInvoiceEvent();
    stateEvent.eventName = PURCHASE_INVOICE_CONFIRM;
    stateEvent.values = values;
    return stateEvent;
  }

  public static DomainEvent purchaseInvoiceUnconfirm(Object[] values) {
   PurchaseInvoiceEvent stateEvent = new PurchaseInvoiceEvent();
    stateEvent.eventName = PURCHASE_INVOICE_UNCONFIRM;
    stateEvent.values = values;
    return stateEvent;
  }

}
